Gharbia, Egypt

hello@mohamedhasan.com
Next.js

If You’re Still Doing These Things in Next.js 2025… We Need to Talk.

Look, I’m not here to explain what useState does. If you’re calling yourself a Mid-Level Next.js Developer in 2025 and still making these mistakes — I’m judging you. Respectfully. Kind of.

Published at — May 10, 2025

If You’re Still Doing These Things in Next.js 2025… We Need to Talk.

Still Writing API Routes Like It’s 2019?

If I catch you spinning up pages/api/** or even worse… app/api/**/route.ts for everything — I’m closing your tab.

Use. Server. Actions.

// Instead of doing this 🙄
export async function POST(req) {
const data = await req.json();
await saveToDB(data);
return NextResponse.json({ ok: true });
}
// Just do this ✅
export async function submitForm(formData) {
"use server";
await saveToDB(formData);
}

You don’t need a whole REST API to submit a damn form.

Exceptions? Sure — webhooks, 3rd-party callbacks, stuff that actually needs an endpoint. But stop using API Routes as your emotional support backend.

Sprinkling use client Like It’s Parmesan Cheese

Some of you out here putting "use client" at the top of every. single. file.

No wonder your Lighthouse score is crying.

Rule: If the component doesn’t interact with the user — it’s server by default.

  • Static text? Server.
  • Fetching data? Server
  • Rendering a list? Server.
  • Has state, refs, or effects? Fine, client.

It’s not complicated. Treat "use client" like hot sauce — a few drops is nice, drowning your plate makes it inedible.

Using fetch Inside Client Components Just Because It Works

Just because it works doesn’t mean it should exist.

Fetching inside Client Components is basically printing money and setting it on fire — on the user's device.

Move your data fetching to Server Components. Let React stream that thing like Netflix. Your users deserve better.

Creating utils/ Folder That Looks Like a Graveyard

Some of you have this:

/utils
- date.js
- format.js
- things.js
- misc.js (the final boss of chaos)

Name things properly. Group by feature, not by file type. You're not building a library for npm. You're building a project. Structure it like one.

Final Advice

If you wanna grow from “I know Next.js” to “I build clean, scalable systems”, remember one thing:

Next.js is not just React with Routing. It’s React with an actual brain. Use it.

Stop shipping spaghetti. Start shipping systems.

If You’re Still Doing These Things in Next.js 2025… We Need to Talk.